//
//  AppDelegate.m
//  MyCloudMusic
//
//  Created by xiaolong on 2023/12/10.
//

#import "AppDelegate.h"
#import "SplashController.h"
#import "GuideController.h"
#import "MainController.h"
#import "SplashControllerTwo.h"
#import "TestLogicControllerViewController.h"
#import "MasonryViewController.h"
#import "RegisterViewController.h"
#import "LoginController.h"
@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [self initNetwork];
    
    //SplashController *controller = [SplashController new];
    //GuideController *controller = [[GuideController alloc] init];
    
    //ViewController *controller = [ViewController new];
    
    //MainController *controller = [MainController new];
    //UINavigationController *root = [[UINavigationController alloc] initWithRootViewController:controller];
    //[controller initSubController];
    //SplashControllerTwo *controller = [SplashControllerTwo new];
    
    //MasonryViewController *controller = [MasonryViewController new];
    //LoginController *controller = [LoginController new];

    RegisterViewController *controller = [RegisterViewController new];
    
    // *controller = [TestLogicControllerViewController new];
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.rootViewController = controller;
   
    
    [self.window makeKeyAndVisible];
    
 
    
    return YES;
}

- (void)initNetwork{
#if DEBUG
    [MSNetwork openLog];
#endif
    
    [MSNetwork setBaseURL:ENDPOINT];
    [MSNetwork setRequestTimeoutInterval:10.0f];
    [MSNetwork setRequestSerializer:MSRequestSerializerJSON];
    [MSNetwork setBaseParameters:nil];
}


- (void)applicationDidBecomeActive:(UIApplication *)application{
    NSLog(@"%p", UIApplication.sharedApplication.delegate);
    NSLog(@"%p",self);
}

@end
